// Personneldeclaration
import React from 'react' ;
import { Row,Col,Input } from 'antd';
import './Personneldeclaration.scss' ;
import Bannel_title from '../../component/Bannel_title/Bannel_title' ;
import rcsb_banner from '../../static/Personneldeclaration/rcsb_banner.jpg' ;
import rcsb_shenbaoliucheng from '../../static/Personneldeclaration/rcsb_shenbaoliucheng.jpg' ;

import $ from 'jquery' ;

import rcsb_shenbaogongshi from '../../static/Personneldeclaration/rcsb_shenbaogongshi.jpg'
import rcsb_rencaizhengce from '../../static/Personneldeclaration/rcsb_rencaizhengce.jpg'
import rcsb_rencaizhanshi from '../../static/Personneldeclaration/rcsb_rencaizhanshi.jpg'

const Search = Input.Search;
let news_pic_arr = [rcsb_shenbaogongshi,rcsb_rencaizhengce,rcsb_rencaizhanshi] ;

class Personneldeclaration extends React.Component{
    constructor(props){
        super(props) ;
        this.state = {
            home_news : news_pic_arr[0] ,
        }
    }
    changepic(value,e){
        $(".Personneldeclaration_shenbaogongshi_nav span").removeClass('activeClass') ;
        $(e.target).addClass('activeClass') ;
        let pic = news_pic_arr[value] ;
        this.setState({
            home_news : pic,
        })
    }
    turn2Page(e){
        this.props.history.push(e) ;
    }
    render(){
        return(
            <div className='Personneldeclaration'>
                <div className='Personneldeclaration_banner'>
                    <img src={rcsb_banner} alt="等待加载"/>
                </div>
                <div className='container Personneldeclaration_shenbaoliucheng'>
                    <Bannel_title title='申报流程'/>
                    <img src={rcsb_shenbaoliucheng} alt="等待加载"/>
                </div>
                <Row gutter={24}>
                    <Col span={4}/>
                    <Col span={16}>
                        <Search placeholder="请输入您要查询的事项" enterButton="搜索" size="large" style={{ marginTop:'40px',marginBottom:'40px' }}/>
                    </Col>
                </Row>
                <div className='Personneldeclaration_shenbaogongshi container'>
                    <div className='Personneldeclaration_shenbaogongshi_nav'>
                        <span onClick={this.changepic.bind(this,0)} className='activeClass'>申报公示</span>
                        <span onClick={this.changepic.bind(this,1)}>人才政策</span>
                        <span onClick={this.changepic.bind(this,2)}>人才展示</span>
                    </div>
                    <div>
                        <img onClick={this.turn2Page.bind(this,"/TalentNews")} src={this.state.home_news} alt="等待加载" style={{ width:'100%',marginTop:'30px',cursor:"pointer" }}/>
                    </div>
                </div>
            </div>
        )
    }
}

export default Personneldeclaration ;